package org.liang.code.mapper;

import org.apache.ibatis.annotations.*;

import java.util.Map;

public interface KingBaseMapper {

    @Select("SELECT 1")
    String select1();

    @Select("select @@version")
    String selectVersion();

    @Update("DROP TABLE IF EXISTS ${tableName} CASCADE")
    void dropTable(@Param("tableName") String tableName);

    @Update("${sql}")
    void ddl_sql(@Param("sql") String sql);

    @Insert("INSERT INTO [DBO].[T_WWS] ([NAME], [AGE]) VALUES ('miao', 19)")
    int insertData();

    @Select("SELECT * FROM dbo.[t_wws] tw WHERE tw.[age] &gt; 18")
    Map<String, Object> select();

    @Delete("DELETE FROM [dbo].[t_wws] WHERE id = #{id}")
    void delectData(@Param("id") int id);
}
